{extends file="main.tpl"}
{block name=body}
<form name="tables" method="post" action="{$smarty.server.PHP_SELF}">
<table align="center"  border="1" cellpadding="2" cellspacing="2" id="tableNo" clsss="waiterdiv" >
		<tr>
		 <td align="center" class="table1" colspan="9" valign="top"><b>Order Master</b></td>
		</td>
		<tr>
		  <td align="center" colspan="9" class="table1">
		    <select name="allTables" autofocus="autofocus" onchange="this.form.submit();">
		    <option value="0">All Table</option>
		      {html_options values=$tableStausValueArr output=$tableStausOutputArr selected=$allTablesSelected}
		    </select>
		  </td>
		</tr>
		<tr>
			<td class="table1">Payment</td>
			<td class="table1"><b>Print</b></td>
			<td class="table1"><b>Table</b></td>
      <td class="table1"><b>Waiter</b></td>
			<td class="table1"><b>Table Part</b></td>
			<td class="table1" align="right"><b>Total Amount</b></td>
			<td class="table1" align="right"><b>Total Items</b></td>
			<td class="table1"><b>Start Time</b></td>
			<td class="table1"><b>Last Order Time</b></td>
		</tr>
		{section name="sec" loop=$joinResult}
		<tr class="{cycle values="odd,even"}">	
			<td class="table2"><a href="receive.php?orderId={$joinResult[sec].orderId}" name="rec">{if {$joinResult[sec].orderstatus} eq 'R'}Received</a>{else}live{/if}</td>
		  <td class="table2" align="center"><a href="selectedTable.php?tableId={$joinResult[sec].tableId}&tablePart={$joinResult[sec].tablePart}&print=1" target="_blank">Print</td>
		  <td class="table2" align="center">{$joinResult[sec].tableId}</td>
      <td class="table2" align="center">{$joinResult[sec].waiterName}</td>
		  <td class="table2" align="center">{$joinResult[sec].tablePart}</td>
		  <td class="table2" align="right">{$joinResult[sec].totalamount}</td>
		  <td class="table2" align="right">{$joinResult[sec].totalItem}</td>
		  <td class="table2" align="center">{$joinResult[sec].startTime}</td>
		  <td class="table2" align="center">{$joinResult[sec].lastordertime}</td>
		  </tr>
		{/section}
</table>
</form>
{/block}